/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.tygzs.minerpg.CommandExecutor.MinePacket;

import net.tygzs.minerpg.Main;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;

/**
 *
 * @author thtTNT
 */
public class Command_NewPlayer
{
    public static void ChangeNewPlayer(CommandSender sender,String PacketName){
        if (!Main.getPluginConfig().getPackets().containsKey(PacketName)){
            sender.sendMessage(ChatColor.RED+"礼包不存在");
            return;
        }
        if (Main.getPluginConfig().getPackets().get(PacketName).isNewPlayerPacket()){
            Main.getPluginConfig().getPackets().get(PacketName).setNewPlayerPacket(false);
            sender.sendMessage(ChatColor.GREEN+"成功取消了这个新手礼包");
        }else{
            Main.getPluginConfig().getPackets().get(PacketName).setNewPlayerPacket(true);
            sender.sendMessage(ChatColor.GREEN+"成功设置了这个新手礼包");
        }
        
    }
}
